﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="EditUser.aspx.cs" Inherits="MusicSite.Views.Content.User.EditUser" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create/Edit user
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server">
    <h2>Create/Edit user</h2>
    
    <fieldset>
        <legend>Fields</legend>
        <table class="regform">
            <tr>
                <td>
                    <asp:Label ID="label1" runat="server" AssociatedControlID="userName" Text="Login:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="userName" runat="server" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label2" runat="server" AssociatedControlID="pass" Text="Password:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="pass" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label3" runat="server" AssociatedControlID="userRole" Text="User role:"></asp:Label>
                </td>
                <td>
                    <%--<asp:TextBox ID="userRole" runat="server"></asp:TextBox>--%>
                    <asp:DropDownList ID="userRole" runat="server">
                        <asp:ListItem Value="0">Unknown</asp:ListItem>
                        <asp:ListItem Value="1">Administrator</asp:ListItem>
                        <asp:ListItem Value="2">Registrator</asp:ListItem>
                        <asp:ListItem Value="3">User</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:LinkButton ID="btnUpdate" runat="server" Text="Update" 
                        OnCommand="UpdateUser"></asp:LinkButton>
                </td>
                <td>
                    <asp:LinkButton ID="btnDelete" runat="server" Text="Delete" 
                        OnCommand="DeleteUser"></asp:LinkButton>
                </td>
            </tr>
        </table> 
               
    </fieldset>
    <div>
        <asp:HyperLink ID="hyperLink" runat="server" Text="Back to list" 
            NavigateUrl="~/Views/Content/User/AdminPage.aspx" ></asp:HyperLink>    
           
    </div>
</form>
</asp:Content>
